package com.windgo.mapper;

import com.windgo.bean.MarketAdminUpdateAdminVo;
import com.windgo.bean.*;

import com.windgo.bean.bo.RoleCreateBO;

import com.windgo.bean.vo.*;




import com.windgo.bean.vo.StatInnerGoods;
import com.windgo.bean.vo.StatInnerOrder;
import com.windgo.bean.vo.StatInnerUser;

import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

public interface MarketAdminMapper {
    long countByExample(MarketAdminExample example);

    int deleteByExample(MarketAdminExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketAdmin row);

    int insertSelective(MarketAdmin row);

    List<MarketAdmin> selectByExample(MarketAdminExample example);
    List<MarketTopic> selectByExample1(MarketTopicExample example);
    MarketAdmin selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("row") MarketAdmin row, @Param("example") MarketAdminExample example);

    int updateByExample(@Param("row") MarketAdmin row, @Param("example") MarketAdminExample example);

    int updateByPrimaryKeySelective(MarketAdmin row);

    int updateByPrimaryKey(MarketAdmin row);

    int insertMarketStorage(@Param("marketStorage") MarketStorage marketStorage);

    MarketStorage queryMarketStorageById(Integer id);


    int insertTopic(@Param("marketTopic") MarketTopic marketTopic);

    MarketTopicVo selectMarketTopicExampleById(Integer id);

    MarketTopic selectMarketTopicById(Integer id);

    MarketGoodsList selectMarketGoodsByGoodsId(Integer good);

    void updateMarketTopic(MarketTopic marketTopic);

    int deleteMarketTopicById(Integer id);

    List<MarketAdminAdminListVo> selectByAdminAdminList(MarketAdminExample example);

    int insertAdmin(@Param("adminListVo") MarketAdminAdminCreateVo adminListVo);

    MarketAdminAdminCreateVo selectMarketAdmin(String username);

    List<MarketLog> selectLogList(MarketLogExample example);

    int deleteStorage(@Param("marketStorage") MarketStorage marketStorage);

    int updateStorage(@Param("marketStorage") MarketStorage marketStorage);

    List<MarketStorage> selectByStorageExample(MarketStorageExample marketStorageExample);

    List<MarketSystem> selectAllMallInfo();

    void updateConfigInfo(@Param("value") String value, @Param("keyName") String keyName);

    List<StatInnerUser> statUser();

    List<StatInnerOrder> statOrder();

    List<StatInnerGoods> statGoods();

    List<MarketRole> selectByRoleExample(MarketRoleExample marketRoleExample);

    MarketRole queryMarketRoleById(Integer id);

    int createRole(@Param("createBO") RoleCreateBO createBO);


    int deleteAdminByMarketAdmin(@Param("id") Integer id);

    int updateAdmin(@Param("adminCreateVo") MarketAdminAdminCreateVo adminCreateVo);

    MarketAdminUpdateAdminVo selectAdminByUpdateAdminId(int id);

    List<MarketIssue> selectAllIssue(MarketIssueExample example);

    int insertNewIssue(@Param("marketIssue") MarketIssue marketIssue);

    MarketCreateIssueVo selectIssueById(Integer id);

    int updateIssueById(@Param("issuePo") MarketCreateIssueVo issuePo);

    int deleteIssueById(@Param("issueBo") MarketCreateIssueVo issueBo);



    Integer[] getRoleIdsByUsername(String username);

    List<String> getPermissionsByRoleId(Integer integer);


    int updateRole(@Param("marketRole") MarketRole marketRole);

    int deleteRole(MarketRole marketRole);

    List<com.windgo.bean.vo.RoleOptionsVO> selectOptionByRoleExample(MarketRoleExample marketRoleExample);

    List<String> queryPermissionByRoleId(String roleId);

    List<Integer> queryGPermissionsType();

    List<Integer> queryPPermissionsType(Integer gtype);

    List<PPermissionVO> queryPPermissionInfo(Integer gtype);

    GPermissionInfoVO queryGPermissionInfo(Integer gtype);

    List<CPermissionInfoVO> queryCPermissionInfo(@Param("gtype") Integer gtype, @Param("p_type") int p_type);

    PPermissionInfoVO queryPPermissionFinalInfo(@Param("p_type") int p_type, @Param("gtype") Integer gtype);

    Integer[] selectRolesIdByUsername(String username);

    String selectNameById(Integer id);

    ArrayList<String> selectPermsByRolesId(Integer id);

    String getRoleIdsByUsername1(String username);

    MarketAdmin getRoleIdsByUsername2(String username);

    List<MarketAdminAdminListVo> selectByAdminAdminUsername(String username);

    ArrayList<String> selectByPermissions(String s);




    //List<MarketStorage> listStorage(@Param("marketStorageExample") MarketStorageExample marketStorageExample);

}